package com.f5.management.service.impl;

import com.f5.management.dao.ComplaintDAO;
import com.f5.management.entity.Complaint;
import com.f5.management.service.ComplaintService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class ComplaintServiceImpl implements ComplaintService {
    @Autowired
    private ComplaintDAO complaintDAO;

    @Override
    public void updateComplaint(Complaint complaint) {
        complaintDAO.update(complaint);
    }

    @Override
    public void insertComplaint(Complaint complaint) {
        complaintDAO.insert(complaint);
    }

    @Override
    public void deleteComplaint(int id) {
        complaintDAO.delete(id);
    }

    @Override
    public Complaint selectWarranty(int id) {
        return complaintDAO.get(id);
    }

    @Override
    public List<Complaint> list() {
        return complaintDAO.list();
    }

    @Override
    public int count() {
        return complaintDAO.count();
    }
}
